package group.sicher.common.entity;

import javax.persistence.*;
import java.util.Objects;

/**
 * @Auth rock
 * @Date 2019/7/1 21:07
 * @description
 */
@Entity
@Table(name = "wm_order_comment")
public class OrderCommentEntity {

    private Long id;
    private Long orderId;
    private Long userId;
    private String content;
    private String images;
    private String path;
    private Long numPraise;
    private Integer status;//TODO 状态枚举
    private Long reCommentId;
    private String likeIds;
    private String contentStar;
    private Long createAt;

       @Id
   @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "order_id", nullable = true, length = 50)
    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    @Basic
    @Column(name = "user_id", nullable = true)
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "content", nullable = true, length = 500)
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "images", nullable = true, length = 1000)
    public String getImages() {
        return images;
    }

    public void setImages(String images) {
        this.images = images;
    }

    @Basic
    @Column(name = "path", nullable = true, length = 500)
    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    @Basic
    @Column(name = "num_praise", nullable = true)
    public Long getNumPraise() {
        return numPraise;
    }

    public void setNumPraise(Long numPraise) {
        this.numPraise = numPraise;
    }

    @Basic
    @Column(name = "status", nullable = true)
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    @Basic
    @Column(name = "re_comment_id", nullable = true)
    public Long getReCommentId() {
        return reCommentId;
    }

    public void setReCommentId(Long reCommentId) {
        this.reCommentId = reCommentId;
    }

    @Basic
    @Column(name = "like_ids", nullable = true, length = 500)
    public String getLikeIds() {
        return likeIds;
    }

    public void setLikeIds(String likeIds) {
        this.likeIds = likeIds;
    }

    @Basic
    @Column(name = "content_star", nullable = true, length = 10)
    public String getContentStar() {
        return contentStar;
    }

    public void setContentStar(String contentStar) {
        this.contentStar = contentStar;
    }

    @Basic
    @Column(name = "create_at", nullable = true)
    public Long getCreateAt() {
        return createAt;
    }

    public void setCreateAt(Long createAt) {
        this.createAt = createAt;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OrderCommentEntity that = (OrderCommentEntity) o;
        return id == that.id &&
                Objects.equals(orderId, that.orderId) &&
                Objects.equals(userId, that.userId) &&
                Objects.equals(content, that.content) &&
                Objects.equals(images, that.images) &&
                Objects.equals(path, that.path) &&
                Objects.equals(numPraise, that.numPraise) &&
                Objects.equals(status, that.status) &&
                Objects.equals(reCommentId, that.reCommentId) &&
                Objects.equals(likeIds, that.likeIds) &&
                Objects.equals(contentStar, that.contentStar) &&
                Objects.equals(createAt, that.createAt);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, orderId, userId, content, images, path, numPraise, status, reCommentId, likeIds, contentStar, createAt);
    }
}
